package com.fh.service.system.auth;

import java.util.List;

import javax.annotation.Resource;

import org.springframework.stereotype.Service;

import com.fh.dao.DaoSupport;
import com.fh.entity.Page;

import com.fh.util.PageData;


@Service("authService")
public class AuthService {

	@Resource(name = "daoSupport")
	private DaoSupport dao;
	
	//======================================================================================
	public PageData findAuthById(PageData pd)throws Exception{
		return (PageData)dao.findForObject("AuthMapper.findAuthById", pd);
	}
	
	/*
	* 修改
	*/
	public void editAuth(PageData pd)throws Exception{
		dao.update("AuthMapper.editAuth", pd);
	}
	
	
	/*
	* 保存
	*/
	public void saveAuth(PageData pd)throws Exception{
		dao.save("AuthMapper.saveAuth", pd);
	}
	
	/*
	* 删除
	*/
	public void deleteAuth(PageData pd)throws Exception{
		dao.delete("AuthMapper.deleteAuth", pd);
	}
	/**
	 *查
	 * @param page
	 * @return
	 * @throws Exception
	 */
	@SuppressWarnings("unchecked")
	public List<PageData> listAllAuth(Page page)throws Exception{
		return (List<PageData>) dao.findForList("AuthMapper.listAllAuth", page);
	}
	
	
	
	
}

